<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
    <title>成都市OD分析图</title>
    <link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="http://cache.amap.com/lbs/static/main1119.css"/>
    <link rel="stylesheet" href="css/index1.css">
    <script src="js/jquery.js"></script>
    <script src="//cdn.bootcss.com/jquery/2.2.4/jquery.js"></script>
    <script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
    <script type="text/javascript"
            src="http://webapi.amap.com/maps?v=1.3&key=78d2c8a55b62cb049653ace920a563dc"></script>
    <!-- 下一行是左边的放大缩小移动操作台 -->
<!--    <script type="text/javascript" src="http://cache.amap.com/lbs/static/addToolbar.js"></script>-->
<script src="/js/jquery.js"></script>
    <script>
        $(function () {
            $('.myscroll').myScroll({
                speed: 60, //数值越大，速度越慢
                rowHeight: 38 //li的高度
            });
        });

        $(document).ready(function () {
            var whei = $(window).width()
            $("html").css({ fontSize: whei / 22 });
            $(window).resize(function () {
                var whei = $(window).width();
                $("html").css({ fontSize: whei / 22 })
            });
        });
    </script>
</head>
<style>
    #up-map-div{
        width:300px;
        height:300px;
        top:100px;
        left:0px;
        position:absolute;
        z-index:9999;
        border:1px solid blue;
        background-color:#FFFFFF;
    }
</style>
<body>
<div id="container">
<div id="up-map-div" style="background-color: #0c0c0c">
	 <div class="center">
	 	<div class="title">数据可视化测试1</div>
             
                <div class="echart wenzi">
                    
                    <div id="FontScroll" class="myscroll">
                        <ul>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>1</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>
                                </div>
                            </li>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>2</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>
                                </div>
                            </li>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>3</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>
                                </div>
                            </li>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>4</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>
                                </div>
                            </li>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>5</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>
                                </div>
                            </li>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>6</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>
                                </div>
                            </li>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>7</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>
                                </div>
                            </li>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>8</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>
                                </div>
                            </li>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>9</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>
                                </div>
                            </li>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>10</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>
                                </div>
                            </li>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>11</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>

                                </div>
                            </li>
                            <li>
                                <div class="fontInner clearfix">
                                    <span>
                                        <b>12</b>
                                    </span>
                                    <span>2小时15分</span>
                                    <span>2小时15分</span>

                                </div>
                            </li>

                        </ul>
                    </div>
                </div>

            
            
            
        
    </div>
</div>
</div>
<script type="text/javascript">

    //初始化地图对象，加载地图
    var map = new AMap.Map("container", {resizeEnable: true,
        mapStyle: 'amap://styles/1cb196e91d9c8143886b9d2c68eff8d0',
        center: [104.089081,30.309752],
        zoom: 14,
        dragEnable: true
    });
    var lnglats = [
        [104.089081,30.309752],
        [104.086695,30.717551],
        [104.083519,30.704231],
        [104.07084,30.492309],
    ];

    var infoWindow = new AMap.InfoWindow({offset: new AMap.Pixel(0, -30)});
    for (var i = 0, marker; i < lnglats.length; i++) {
        var marker = new AMap.Marker({
            position: lnglats[i],
            map: map
        });
        // marker.content = '<h3>我是第' + (i + 1) + '个XXX</h3>';
        marker.content += '<div>经度：'+lnglats[i][0]+'</div>';
        marker.content += '<div>纬度：'+lnglats[i][1]+'</div>';
        marker.content += '<div><button  class="btn btn-suucess btn-xs">历史轨迹</button>';
        marker.content += '&nbsp;<button class="btn btn-warning btn-xs">实时跟踪&nbsp;</button>';
        marker.content += '&nbsp;<button  class="btn btn-danger btn-xs">设置</button></div>';

        marker.on('mouseover', infoOpen);
        //注释后打开地图时默认关闭信息窗体
        // marker.emit('mouseover', {target: marker});
        marker.on('mouseout', infoClose);
        marker.on('click', newMAp);
    }

    //鼠标点击事件,设置地图中心点及放大显示级别
    function newMAp(e) {
        //map.setCenter(e.target.getPosition());
        map.setZoomAndCenter(15, e.target.getPosition());

        var infoWindow = new AMap.InfoWindow({offset: new AMap.Pixel(0, -30)});
        infoWindow.setContent(e.target.content);
        infoWindow.open(map, e.target.getPosition());
    }
    function infoClose(e) {
        infoWindow.close(map, e.target.getPosition());
    }
    function infoOpen(e) {
        infoWindow.setContent(e.target.content);
        infoWindow.open(map, e.target.getPosition());
    }
    map.setFitView();

</script>
<script src="js/fontscroll.js"></script>
</body>
</html>
 